﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using Sqo;
using Sqo.Attributes;

namespace Ivvy_Silverlight
{
    /// [Generated Jan 30 2011]
    public partial class i_CalendarItem_Field : ISqoDataObject
    {

        #region "private fields"

        private int _CalendarItem_Field_ID;
        private int _CalendarItem_ID;
        private int _Field_ID;
        private string _Value;
        private int _Sort;
        private string _GUID;
        private int _Field_Details_ID;

        #endregion

        #region "public properties"

        [UseVariableAttribute("_CalendarItem_Field_ID")]
        public int CalendarItem_Field_ID
        {
            get { return _CalendarItem_Field_ID; }
            set { _CalendarItem_Field_ID = value; }
        }

        [UseVariableAttribute("_CalendarItem_ID")]
        public int CalendarItem_ID
        {
            get { return _CalendarItem_ID; }
            set { _CalendarItem_ID = value; }
        }
        public int Field_ID
        {
            get { return _Field_ID; }
            set { _Field_ID = value; }
        }
        
        [UseVariableAttribute("_Value")]
        public string Value
        {
            get { return _Value; }
            set { _Value = value; }
        }
        public int Sort
        {
            get { return _Sort; }
            set { _Sort = value; }
        }
        public string GUID
        {
            get { return _GUID; }
            set { _GUID = value; }
        }
        public int Field_Details_ID
        {
            get { return _Field_Details_ID; }
            set { _Field_Details_ID = value; }
        }

        #endregion

        #region "ISqoDataObject"
        object ISqoDataObject.GetValue(System.Reflection.FieldInfo field) { return field.GetValue(this); }
        void ISqoDataObject.SetValue(System.Reflection.FieldInfo field, object value) { field.SetValue(this, value); }
        public int OID { get; set; }
        //int ISqoDataObject.OID { get { return CalendarItem_Field_ID; } set { } }
        #endregion
        
        #region "MAPPER"
        public static Ivvy_Silverlight.i_CalendarItem_Field Convert(i7SR.CalendarItem_Field od_CalendarItem_Field)
        {
            return new Ivvy_Silverlight.i_CalendarItem_Field()
            {

                CalendarItem_Field_ID = Utils.IsNull(od_CalendarItem_Field.CalendarItem_Field_ID),
                CalendarItem_ID = Utils.IsNull(od_CalendarItem_Field.CalendarItem_ID),
                Field_ID = Utils.IsNull(od_CalendarItem_Field.Field_ID),
                Value = Utils.IsNull(od_CalendarItem_Field.Value),
                Sort = Utils.IsNull(od_CalendarItem_Field.Sort),
                GUID = Utils.IsNull(od_CalendarItem_Field.GUID),
                Field_Details_ID = Utils.IsNull(od_CalendarItem_Field.Field_Details_ID),

            };
        }
        #endregion

        #region "REVERSEMAPPER"
        public static Ivvy_Silverlight.i7SR.CalendarItem_Field ReverseConvert(i_CalendarItem_Field od_CalendarItem_Field)
        {
            return new Ivvy_Silverlight.i7SR.CalendarItem_Field()
            {

                CalendarItem_Field_ID = Utils.ReverseIsNull(od_CalendarItem_Field.CalendarItem_Field_ID).Value,
                CalendarItem_ID = Utils.ReverseIsNull(od_CalendarItem_Field.CalendarItem_ID).Value,
                Field_ID = Utils.ReverseIsNull(od_CalendarItem_Field.Field_ID).Value,
                Value = Utils.ReverseIsNull(od_CalendarItem_Field.Value),
                Sort = Utils.ReverseIsNull(od_CalendarItem_Field.Sort),
                GUID = Utils.ReverseIsNull(od_CalendarItem_Field.GUID),
                Field_Details_ID = Utils.ReverseIsNull(od_CalendarItem_Field.Field_Details_ID),

            };
        }
        #endregion


    }//public partial class o_CalendarItem_Field : ISqoDataObject

    

}//namespace Ivvy_Silverlight
